<?php

namespace App\Http\Controllers\Mobile;

use App\Models\Order;

class SoldController extends BaseController
{
    public function index()
    {


    }

    public function detail(){
        $order_id = $this->request->input('order_id');

        $order = Order::find($order_id);
        if ($order) {
            $shipping = $order->shipping;
            $items = $order->items;

            return $this->view('mobile.sold.detail', compact('order', 'shipping', 'items'));
        } else {
            return ajaxError(404, 'order not found');
        }
    }
}
